package com.woniuxy.utils;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class AllExceptionHandler {

    @ExceptionHandler(MyException.class)
    public Result myException(MyException e){

        return Result.fail(e.getCode(),e.getMessage());
    }
}
